package com.example.orderminiappapi.service.Impl;

import com.example.orderminiappapi.bean.Order;
import com.example.orderminiappapi.bean.OrderItem;
import com.example.orderminiappapi.bean.SearchCondition;
import com.example.orderminiappapi.bean.Shop;
import com.example.orderminiappapi.dao.OrderDao;
import com.example.orderminiappapi.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderDao orderDao;

    @Override
    public int addOrder(Order order) {
        return orderDao.addOrder(order);
    }

    @Override
    public int addOrderItem(OrderItem orderItem) {
        return orderDao.addOrderItem(orderItem);
    }

    @Override
    public int changeOrderAllPay(Order order) {
        return orderDao.changeOrderAllPay(order);
    }

    @Override
    public int deleteOrderItemByOrderId(Order order) {
        return orderDao.deleteOrderItemByOrderId(order);
    }

    @Override
    public int perfectOrder(Order order) {
        return orderDao.perfectOrder(order);
    }

    @Override
    public Order getOrderByOrderId(Order order) {
        return orderDao.getOrderByOrderId(order);
    }

    @Override
    public List<OrderItem> getOrderItemByOrderId(Order order) {
        return orderDao.getOrderItemByOrderId(order);
    }

    @Override
    public Order getUnPerfectedOrder(Order order) {
        return orderDao.getUnPerfectedOrder(order);
    }

    @Override
    public int deleteUnPerfectedOrder(Order order) {
        return orderDao.deleteUnPerfectedOrder(order);
    }

    @Override
    public int deleteUnPerfectedOrderItem(Order order) {
        return orderDao.deleteUnPerfectedOrderItem(order);
    }

    @Override
    public List<Order> getAllOrder(Order order) {
        return orderDao.getAllOrder(order);
    }

    @Override
    public Order getOneOrder(Order order) {
        return orderDao.getOneOrder(order);
    }

    @Override
    public int doRate(Order order) {
        return orderDao.doRate(order);
    }

    @Override
    public int doEvaluate(Order order) {
        return orderDao.doEvaluate(order);
    }

    @Override
    public List<Order> shopOwnerSearchOrder(SearchCondition searchCondition) {
        return orderDao.shopOwnerSearchOrder(searchCondition);
    }

    @Override
    public int shopOwnerSearchOrderCount(SearchCondition searchCondition) {
        return orderDao.shopOwnerSearchOrderCount(searchCondition);
    }

    @Override
    public List<Order> getUnAcceptedOrder(Order order) {
        return orderDao.getUnAcceptedOrder(order);
    }

    @Override
    public List<Order> getUnCompletedOrder(Order order) {
        return orderDao.getUnCompletedOrder(order);
    }

    @Override
    public int getAllShopUnAcceptedOrder(Shop shop) {
        return orderDao.getAllShopUnAcceptedOrder(shop);
    }

    @Override
    public int acceptOrder(Order order) {
        return orderDao.acceptOrder(order);
    }

    @Override
    public int cancelOrder(Order order) {
        return orderDao.cancelOrder(order);
    }

    @Override
    public int completeOrder(Order order) {
        return orderDao.completeOrder(order);
    }

    @Override
    public int getOrderTrend(Order order) {
        return orderDao.getOrderTrend(order);
    }

    @Override
    public float getSaleTrend(Order order) {
        return orderDao.getSaleTrend(order);
    }

    @Override
    public int getAllOrderTrend(Order order, Shop shop) {
        return orderDao.getAllOrderTrend(order, shop);
    }

    @Override
    public float getAllSaleTrend(Order order, Shop shop) {
        return orderDao.getAllSaleTrend(order, shop);
    }

    @Override
    public List<Order> managerSearchOrder(SearchCondition searchCondition) {
        return orderDao.managerSearchOrder(searchCondition);
    }

    @Override
    public int managerSearchOrderCount(SearchCondition searchCondition) {
        return orderDao.managerSearchOrderCount(searchCondition);
    }
}
